package Thread;

import java.util.Scanner;

public class ThreadDemo03 {
    static String content;

    public static void main(String[] args) {
        Thread mainThread=Thread.currentThread();
        Thread t=new Thread(()->{
            content="hello";
            mainThread.interrupt();
        });
        t.start();
        try{
            Thread.sleep(1000);

        }catch(InterruptedException e){
            //System.out.println("interrupted");
        };
        //
        // while(content==null) Thread.yield();
        //Scanner sc = new Scanner(System.in);
        //sc.nextLine();
        System.out.println(content.toUpperCase());
    }
}
